<template>
  <div class="home">
    <BForm :fields="formArray" @submit="submit"></BForm>
  </div>
</template>

<script setup lang="ts">
import BForm from '@/components/BForm.vue';
let formArray = reactive([
  {
    label: '姓名',
    type: 'text',
    prop: 'name',
    clearable: true,
    suffix: 'search',
    prefix: 'calendar'
  },
  {
    label: '密码',
    type: 'password',
    placeholder: '请输入密码',
    prop: 'password',
  },
])

const submit = (data: any) => {
  console.log(data)
}

</script>
<style lang="scss"></style>